package com.cn.wanxi.service.impl;

import com.cn.wanxi.dao.impl.CuisineImpl;
import com.cn.wanxi.model.CuisineModel;
import com.cn.wanxi.model.ResultModel;
import com.cn.wanxi.dao.CuisineDao;
import com.cn.wanxi.service.ICuisineService;

import java.util.List;

public class CuisineServiceImpl implements ICuisineService {
    @Override
    public ResultModel findAll() {
        CuisineDao cuisineDao = new CuisineImpl();
        ResultModel resultModel = new ResultModel();
        List<CuisineModel> list = cuisineDao.findAll();
        if (list == null) {
            resultModel.setCode("400");
        } else {
            resultModel.setCode("200");
            resultModel.setObject(list);
        }
        return resultModel;
    }
}
